package simple_factory;

public class Factory {

    public static Car productCar(String carName){
        if (carName.equals("Benz")){
            return new Benz();
        } else if (carName.equals("Bmw")){
            return new Bmw();
        }
        return null;
    }
}
